package day2;

public class Truck extends Automobile{
    private String type;

    public Truck(String brand, String plateNumber,String type) {
        super(brand, plateNumber);
        this.type = type;
    }

    public int getRent(int days) {
        if(type.equals("小型")) {
            return 300*days;
        }else if(type.equals("中型")) {
            return 350*days;
        }else {
            return 500*days;
        }
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
